import { defineStore } from "pinia";
interface themeInter {
  primaryColor: string,
  themeType: string
}
export const themeStore = defineStore("theme", {
  state: ():themeInter => {
    return {
      // 主色系
      primaryColor: "#1890ff",
      // 主题色
      themeType: "blue"
    };
  },
  getters: {
    getPrimary(): string {
      return this.primaryColor;
    },
    getThemeType(): string {
      return this.themeType;
    }
  },
  // 同步和异步都可以写
  actions: {
    setPrimary(color: string) {
      this.primaryColor = color;
    },
    setThemeType(type: string) {
      this.themeType = type;
    }
  },
})